

This subdirectory contains the replication material for the analysis for the Bayesian model for persuasion
in small groups that is central to our paper.  If you do not have experience estimating a model in OpenBUGS
then we strongly recommend you first navigate to the Tutorial subdirectory that we also include with our
replication materials, and watch the videos for both the basic model examples as well as the full model examples
before you work with the replication material in this folder.

To replicate the model results, you need to read into OpenBUGS the following files:
persuation_replication_model.txt
persuasion_replication_data.txt
state1.txt
state2.txt
state3.txt
persuasion_replication_script.txt

The state text files constain starting values that are located within the stationary posterior distribution.  The 
script text file is not essential but saves you time from needing to type in each of the nodes to monitor.

The file persuasion_oboe_replication_setup.R shows how we use R transform the original data (contained in the three 
Stata files) for the analysis, and create naive initial values, and export the data and inits to text files
for reading into OpenBUGS.  The working data files we use in this model are:

persuasion_v12.dta # this is the main working replication data for most of the analysis 
ideology_ice_v12.dta # this file contains the imputed complete cases for fixed liberal/moderate/conservative
	Imputation is done via the Stata ice procedure with one imputation.  These must be complete cases.
persuasion_ice_v12.dta # this file has the complete case imputed pretreatment responses, also using ice.  
	These become the indicator variables for pretreatment responses in the outcome equations.  These also 
	need to be complete cases.

For convenience, we include the persuasion_replication.RData R workspace  that includes the workspace after 
runnning the setup; using this file saves some time since it takes a minute or two for the setup procedure to 
create the adjacency matrix and the vectors of adjacencies needed in the model.

The mainresults.R file shows how we read in the coda files back into R to create the figures in the paper.  For 
convenience we include the stats.txt file that summarizes the mean and standard deviations for each of the
estimated parameters, and the history.odc file (which you can open in OpenBUGS to view) contains the traceplots
showing the sampling process came from a stationary posterior with good mixing.

